﻿
using Xc.DataAccess.Docs.Services;

namespace Microsoft.Extensions.DependencyInjection
{
    /// <summary>
    /// 应用程序扩展
    /// </summary>
    public static class ApplicationExtension
    {
        /// <summary>
        /// 文档转换服务
        /// <list type="number">
        /// <item>文档转换服务,<see cref="IPanDocService"/></item>
        /// <item>构建文档上下文,<see cref="IWriteContextService"/></item>
        /// </list>
        /// </summary>
        /// <param name="serviceDescriptors"></param>
        /// <returns></returns>
        public static IServiceCollection AddPanDocService(this IServiceCollection serviceDescriptors)
        {
            serviceDescriptors.AddTransient<IPanDocService, PanDocService>();
            serviceDescriptors.AddTransient<IWriteContextService, WriteContextService>();
            return serviceDescriptors;
        }
    }
}
